package edu.scdx.dao;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import edu.scdx.entity.Trans;

@Repository

public interface TransMapper {

	@Select("select * from trans where tel = #{tel}")
	Trans getTrans(@Param("tel")String userTel);

	@Select("insert into trans(tel,address,phone,postcode,name) values(#{tel},#{address},#{phone},#{postcode},#{name}) ")
	void addTrans(@Param("tel")String userTel,@Param("address") String address, @Param("phone")String phone,@Param("postcode") String postcode,@Param("name")String name);

	@Select("update `trans` set address=#{address},phone=#{phone},postcode=#{postcode},name=#{name} where tel=#{tel}")
	void updateTrans(@Param("tel")String userTel,@Param("address") String address, @Param("phone")String phone,@Param("postcode") String postcode,@Param("name") String name);

}
